package com.cloudkinto.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.util.Date;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 物流费-超长超重附加费
 * </p>
 * @author hua
 * @since 2024-11-11
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_freight_over_surcharge")
public class FreightOverSurchargeDo extends Model<FreightOverSurchargeDo> {

    private static final long serialVersionUID=1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 偏远类型
     */
    @TableField("surcharge_type")
    private Integer surchargeType;

    /**
     * 是否区分地址类型 0不区分 1区分
     */
    @TableField("distinct_addr_type")
    private Integer distinctAddrType;

    /**
     * 附加费-超长超重规则id
     */
    @TableField("over_id")
    private Long overId;

    /**
     * 类型 物流费模板 还是 物流费
     */
    @TableField("type")
    private String type;

    /**
     * 主表id
     */
    @TableField("freight_id")
    private Long freightId;

    @TableField("create_time")
    private Date createTime;

    @TableField(value = "create_by", fill = FieldFill.INSERT)
    private Long createBy;

    @TableField("delete_time")
    private Date deleteTime;

    @TableField("delete_by")
    private Long deleteBy;

    @TableField("delete_flag")
    @TableLogic
    private Integer deleteFlag;

    @TableField(value = "update_time", fill = FieldFill.UPDATE)
    private Date updateTime;

    @TableField("update_by")
    private Long updateBy;

    public FreightOverSurchargeDo() {
    }

    public FreightOverSurchargeDo(Integer surchargeType, Integer distinctAddrType, Long overId, String type, Long freightId) {
        this.surchargeType = surchargeType;
        this.distinctAddrType = distinctAddrType;
        this.overId = overId;
        this.type = type;
        this.freightId = freightId;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
